<template>
  <view class="content">
    <image class="logo" src="/static/logo.png" />
    <view class="text-area">
      <text class="title">{{ title }}</text>
    </view>
    <view>
      <button type="primary" @click="onclick">Click Me</button>
    </view>
    <view style="width: 100%; height: 300px;">
        <map style="width: 100%; height: 300px;" :latitude="latitude" :longitude="longitude" :markers="covers">
        </map>
    </view>
  </view>
</template>

<script setup lang="ts">
import { ref } from 'vue'
const title = ref('Hello')

const id = 0 // 使用 marker点击事件 需要填写id
const latitude = 29.2
const longitude = 119.4
const covers = [{
  latitude: 29.2,
  longitude: 119.4,
  iconPath: '../../../static/logo.png'
}, {
  latitude: 39.90,
  longitude: 116.39,
  iconPath: '../../../static/logo.png'
}]

const onclick = () => {
  title.value = 'Hello UniApp!'
  uni.navigateTo({
    url: '/pages/login/login'
  })
}

</script>

<style>
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo {
  height: 200rpx;
  width: 200rpx;
  margin-top: 200rpx;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 50rpx;
}

.text-area {
  display: flex;
  justify-content: center;
}

.title {
  font-size: 36rpx;
  color: #8f8f94;
}
</style>
